package top.canyue.word_range.pojo.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import top.canyue.word_range.pojo.po.User;

/**
 * 用户DTO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserDto {
    /**
     * 用户名
     */
    private String name;
    /**
     * 密码
     */
    private String password;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 头像地址
     */
    private String avatarUrl;
    /**
     * 积分
     */
    private int activityIntegral = 0;
    /**
     * 个性签名
     */
    private String signature;

    public User toPo(){
        User user = new User();
        user.setName(name);
        user.setPhone(phone);
        user.setAvatarUrl(avatarUrl);
        user.setActivityIntegral(activityIntegral);
        user.setSignature(signature);
        return user;
    }
}
